import request from '@/utils/request'

/*
*获取车辆类型分页数据接口
*  */
export const fetchCarModelsListAPI = (params) => {
  return request({
    url: '/manager/truckType/page',
    method: 'GET',
    params
  })
}

/*
* 删除车型的接口
*  */
export const deleteCarModelsAPI = (id) => {
  return request({
    url: `/manager/truckType/${id}`,
    method: 'DELETE'
  })
}

/*
* 添加车辆类型的接口
*  */
export const addCarModelsAPI = (data) => {
  return request({
    url: '/manager/truckType',
    method: 'POST',
    data
  })
}

/*
* 更新车辆类型的接口
*  */
export const updateCarModelsAPI = (data) => {
  return request({
    url: `/manager/truckType/${data.id}`,
    method: 'PUT',
    data
  })
}

/*
* 获取车辆类型详情的接口
*  */
export const fetchCarModelsAPI = (id) => {
  return request({
    url: `/manager/truckType/${id}`,
    method: 'GET'
  })
}
/*
* 获取车辆类型信息列表的接口
*  */
export const fetchCarModelsListTypeAPI = () => {
  return request({
    url: '/manager/truckType/simple',
    method: 'GET'
  })
}
